﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using Bitis_KeToanThue_Pro_DungChung.Common;

namespace Bitis_KeToanThue_Pro_Update.AccessDatabase
{
    public class DangNhap
    {
        AccessData ac = new AccessData(1);
        public DataTable logininformation(string username, string password, int machuongtrinh, int IDViTri)
        {
            SqlParameter[] arrPara = new SqlParameter[4];
            arrPara[0] = new SqlParameter("@username", SqlDbType.NVarChar);
            arrPara[0].Value = username;
            arrPara[1] = new SqlParameter("@PassWord", SqlDbType.NVarChar);
            arrPara[1].Value = password;
            arrPara[2] = new SqlParameter("@MaChuongTrinh", SqlDbType.Int);
            arrPara[2].Value = machuongtrinh;
            arrPara[3] = new SqlParameter("@IDViTri", SqlDbType.Int);
            arrPara[3].Value = IDViTri;

            return ac.ftblDocDuLieuSP("thuan_dangnhap", arrPara);

        }
    }
}
